package com.amumu.controller;

import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

@Controller

@RequestMapping("/demo")
public class DemoController {
	
	 @GetMapping("/index")
	 public ModelAndView index() {
	        return new ModelAndView("index");
	 }
	 
	 @GetMapping("/list")
	 @ResponseBody
	 public List list() {
		 List list = new ArrayList();
		 list.add("111");
		 list.add("222");
		 return list;
	 }
}
